<template>
  <div class="dialog-box">
    <div class="msg-warp">
      <div class="ts">你确定要删除该商品吗？</div>
      <div class="btn-warp">
        <div class="btn btn-confirm" @click="confirm">确定</div>
        <div class="btn btn-cancal" @click="cancal">取消</div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  methods: {
    cancal() {
      this.$emit("hideDel");
    },
    confirm() {
      this.$emit("delCart");
    }
  }
};
</script>

<style lang="scss">
.dialog-box {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 50%;
  right: 0;
  width: 1080px;
  z-index: 2000;
  transform: translate(-50%);
  background: rgba(0, 0, 0, 0.3);
  .msg-warp {
    width: 600px;
    height: 350px;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 10px;
    border: 1px solid #ebeef5;
    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
    .ts {
      text-align: center;
      font-size: 34px;
      margin-top: 120px;
    }
    .btn-warp {
      display: flex;
      width: 400px;
      margin: 0 auto;
      margin-top: 50px;

      .btn {
        width: 120px;
        height: 60px;
        line-height: 60px;
        border-radius: 4px;
        text-align: center;
        font-size: 28px;
        margin-left: 44px;
      }
      .btn-confirm {
        background: #ee4433;
        color: #fff;
      }
      .btn-cancal {
        background: #ccc;
        color: #fff;
      }
    }
  }
}
</style>
